600 |
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; with (Columns.Add('P1') as EXTREELib.Column) do begin Def[EXTREELib.DefColumnEnum.exCellHasCheckBox] := TObject(True); PartialCheck := True; end; with (Columns.Add('P2') as EXTREELib.Column) do begin Def[EXTREELib.DefColumnEnum.exCellHasCheckBox] := TObject(True); PartialCheck := True; FormatColumn := '1 index ``'; end; with Items do begin h := AddItem('Root'); InsertItem(h,Nil,'Child A'); InsertItem(h,Nil,'Child B'); InsertItem(h,Nil,'Child A'); InsertItem(h,Nil,'Child B'); AddItem('Root'); AddItem('Root'); end; SingleSort := False; Layout := 'multiplesort="C0:1 C1:2";collapse=""'; EndUpdate(); end |
599 |
How can I get ride / hide the image being dragged by OLE Drag and Drop
// OLEStartDrag event - Occurs when the OLEDrag method is called. procedure TWinForm1.AxTree1_OLEStartDrag(sender: System.Object; e: AxEXTREELib._ITreeEvents_OLEStartDragEvent); begin // Data.SetData("data to drag") with AxTree1 do begin e.allowedEffects := 1; end end; with AxTree1 do begin OLEDropMode := EXTREELib.exOLEDropModeEnum.exOLEDropManual; set_Background(EXTREELib.BackgroundPartEnum.exDragDropAfter,$ffffff); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; Columns.Add('Default'); with Items do begin h := AddItem('Root'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; end; end |
598 |
How can I export checked items only
with AxTree1 do begin BeginUpdate(); MarkSearchColumn := False; with Columns do begin (Add('C1') as EXTREELib.Column).Def[EXTREELib.DefColumnEnum.exCellHasCheckBox] := TObject(True); (Add('C2') as EXTREELib.Column).FormatColumn := '1 index `A-Z`'; (Add('C3') as EXTREELib.Column).FormatColumn := '100 index ``'; end; with Items do begin AddItem('Item 1'); CellState[TObject(AddItem('Item 2')),TObject(0)] := 1; CellState[TObject(AddItem('Item 3')),TObject(0)] := 1; end; EndUpdate(); OutputDebugString( 'Export CSV Checked Items Only:' ); OutputDebugString( Export('','chk') ); end |
597 |
How can I export a hidden column
with AxTree1 do begin BeginUpdate(); MarkSearchColumn := False; with Columns do begin Add('C1'); with (Add('C2') as EXTREELib.Column) do begin FormatColumn := '1 index `A-Z`'; Visible := False; end; with (Add('C3') as EXTREELib.Column) do begin FormatColumn := '100 index ``'; Visible := False; end; end; with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); end; EndUpdate(); OutputDebugString( 'Export CSV Hidden Columns (1,2):' ); OutputDebugString( Export('','|1,2') ); end |
596 |
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; DrawGridLines := EXTREELib.GridLinesEnum.exRowLines; AutoDrag := EXTREELib.AutoDragEnum.exAutoDragPositionAny; HasLines := EXTREELib.HierarchyLineEnum.exSolidLine; Indent := 16; MarkSearchColumn := False; with Columns do begin with (Add('') as EXTREELib.Column) do begin Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); FormatColumn := '((1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 + `` : (=:0 mid (1 + 1 + =:1) ) + `)` ) + ` ` + value'; end; end; with Items do begin h := AddItem('Root'); InsertItem(h,Nil,'Child'); hChild := InsertItem(h,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(h,Nil,'Child'); ExpandItem[0] := True; h := AddItem('Root'); InsertItem(h,Nil,'Child'); hChild := InsertItem(h,Nil,'Child'); CellState[TObject(hChild),TObject(0)] := 1; InsertItem(hChild,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(h,Nil,'Child'); end; EndUpdate(); end |
595 |
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; GridLineColor := Color.FromArgb(190,190,190); DrawGridLines := EXTREELib.GridLinesEnum.exRowLines; AutoDrag := EXTREELib.AutoDragEnum.exAutoDragPositionAny; HasLines := EXTREELib.HierarchyLineEnum.exSolidLine; Indent := 16; with Columns do begin Add('Default'); with (Add('') as EXTREELib.Column) do begin Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); Def[EXTREELib.DefColumnEnum.exCellPaddingRight] := TObject(4); AllowSizing := False; Width := 36; Position := 0; FormatColumn := '(1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =:' + '1) ) '; end; end; with Items do begin h := AddItem('Root'); InsertItem(h,Nil,'Child'); hChild := InsertItem(h,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(h,Nil,'Child'); ExpandItem[0] := True; h := AddItem('Root'); InsertItem(h,Nil,'Child'); hChild := InsertItem(h,Nil,'Child'); CellState[TObject(hChild),TObject(0)] := 1; InsertItem(hChild,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(h,Nil,'Child'); end; EndUpdate(); end |
594 |
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; DrawGridLines := EXTREELib.GridLinesEnum.exRowLines; AutoDrag := EXTREELib.AutoDragEnum.exAutoDragPositionAny; HasLines := EXTREELib.HierarchyLineEnum.exSolidLine; Indent := 16; with Columns do begin Add('Default'); with (Add('') as EXTREELib.Column) do begin Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); Def[EXTREELib.DefColumnEnum.exCellPaddingRight] := TObject(4); Alignment := EXTREELib.AlignmentEnum.RightAlignment; AllowSizing := False; Width := 24; Position := 0; FormatColumn := '(1:=(0 :=(1 rpos ''.|A-Z||a-z|'')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) '; end; end; with Items do begin h := AddItem('Root'); InsertItem(h,Nil,'Child'); hChild := InsertItem(h,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(h,Nil,'Child'); ExpandItem[0] := True; h := AddItem('Root'); InsertItem(h,Nil,'Child'); hChild := InsertItem(h,Nil,'Child'); CellState[TObject(hChild),TObject(0)] := 1; InsertItem(hChild,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(hChild,Nil,'Child'); InsertItem(h,Nil,'Child'); end; EndUpdate(); end |
593 |
Is it possible to have a different alignment for parts of the cell's caption
with AxTree1 do begin BeginUpdate(); TreeColumnIndex := -1; DrawGridLines := EXTREELib.GridLinesEnum.exRowLines; with (Columns.Add('Default') as EXTREELib.Column) do begin Def[EXTREELib.DefColumnEnum.exCellHasCheckBox] := TObject(True); end; with Items do begin CellHAlignment[TObject(AddItem('all-left')),TObject(0)] := EXTREELib.AlignmentEnum.LeftAlignment; CellHAlignment[TObject(AddItem('all-center')),TObject(0)] := EXTREELib.AlignmentEnum.CenterAlignment; CellHAlignment[TObject(AddItem('all-right')),TObject(0)] := EXTREELib.AlignmentEnum.RightAlignment; h := AddItem('left<c>center<r>right'); CellCaptionFormat[TObject(h),TObject(0)] := EXTREELib.CaptionFormatEnum.exHTML; end; EndUpdate(); end |
592 |
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
with AxTree1 do begin BeginUpdate(); with Columns do begin with (Add('MultipleLine') as EXTREELib.Column) do begin Width := 32; Def[EXTREELib.DefColumnEnum.exCellSingleLine] := TObject(False); Def[EXTREELib.DefColumnEnum.exColumnResizeContiguously] := TObject(True); end; with (Add('SingleLine') as EXTREELib.Column) do begin Def[EXTREELib.DefColumnEnum.exCellSingleLine] := TObject(False); end; end; with Items do begin CellCaption[TObject(AddItem('This is a bit of long text that should break the line')),TObject(1)] := 'This is a bit of long text that should break the line'; end; EndUpdate(); end |
591 |
How do I sort the index column as numeric
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxTree1_AddItem(sender: System.Object; e: AxEXTREELib._ITreeEvents_AddItemEvent); begin with AxTree1 do begin with Items do begin CellData[TObject(e.item),TObject(1)] := TObject(ItemToIndex[e.item]); end; end end; with AxTree1 do begin BeginUpdate(); DrawGridLines := EXTREELib.GridLinesEnum.exAllLines; ColumnAutoResize := True; ShowFocusRect := False; with (Columns.Add('Next') as EXTREELib.Column) do begin Def[EXTREELib.DefColumnEnum.exCellPaddingLeft] := TObject(4); Def[EXTREELib.DefColumnEnum.exHeaderPaddingLeft] := TObject(4); end; with (Columns.Add('Index') as EXTREELib.Column) do begin AllowSizing := False; Width := 48; FormatColumn := '(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)'; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); SortType := EXTREELib.SortTypeEnum.SortUserData; Position := 0; end; with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 4'); AddItem('Item 5'); AddItem('Item 6'); AddItem('Item 7'); AddItem('Item 8'); AddItem('Item 9'); AddItem('Item 10'); end; EndUpdate(); end |
590 |
How can I put icons/images into buttons
with AxTree1 do begin BeginUpdate(); ColumnAutoResize := True; Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); with (Columns.Add('C+B') as EXTREELib.Column) do begin AllowSizing := False; Width := 48; FormatColumn := '` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `'; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); Def[EXTREELib.DefColumnEnum.exCellHasCheckBox] := TObject(True); Def[EXTREELib.DefColumnEnum.exCellHasButton] := TObject(True); Def[EXTREELib.DefColumnEnum.exCellButtonAutoWidth] := TObject(True); end; Columns.Add(''); DrawGridLines := EXTREELib.GridLinesEnum.exVLines; DefaultItemHeight := 20; with Items do begin AddItem(''); AddItem(''); AddItem(''); AddItem(''); AddItem(''); AddItem(''); AddItem(''); AddItem(''); end; EndUpdate(); end |
589 |
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column
// CellButtonClick event - Fired after the user clicks on the cell of button type. procedure TWinForm1.AxTree1_CellButtonClick(sender: System.Object; e: AxEXTREELib._ITreeEvents_CellButtonClickEvent); begin with AxTree1 do begin OutputDebugString( 'CellButtonClick' ); OutputDebugString( e.item ); end end; // CellStateChanged event - Fired after cell's state has been changed. procedure TWinForm1.AxTree1_CellStateChanged(sender: System.Object; e: AxEXTREELib._ITreeEvents_CellStateChangedEvent); begin with AxTree1 do begin OutputDebugString( 'CellStateChanged' ); OutputDebugString( e.item ); end end; with AxTree1 do begin BeginUpdate(); ColumnAutoResize := True; with (Columns.Add('') as EXTREELib.Column) do begin AllowSizing := False; Width := 32; FormatColumn := '1 index ``'; end; with (Columns.Add('Def') as EXTREELib.Column) do begin AllowSizing := False; Width := 48; FormatColumn := '` `'; Def[EXTREELib.DefColumnEnum.exCellHasCheckBox] := TObject(True); Def[EXTREELib.DefColumnEnum.exCellHasButton] := TObject(True); Def[EXTREELib.DefColumnEnum.exCellButtonAutoWidth] := TObject(True); end; Columns.Add(''); with Items do begin AddItem(''); AddItem(''); AddItem(''); AddItem(''); AddItem(''); AddItem(''); AddItem(''); AddItem(''); end; EndUpdate(); end |
588 |
Does filtering work with umlauts / accents characters
with AxTree1 do begin BeginUpdate(); with (Columns.Add('Names') as EXTREELib.Column) do begin DisplayFilterButton := True; FilterType := EXTREELib.FilterTypeEnum.exPattern; end; with Items do begin AddItem('Mantel'); AddItem('Mechanik'); AddItem('Motor'); AddItem('Murks'); AddItem('Märchen'); AddItem('Möhren'); AddItem('Mühle'); AddItem('Sérigraphie'); end; Columns.Item[TObject(0)].Filter := '*ä*'; ApplyFilter(); EndUpdate(); end |
587 |
The Items.FirstVisibleItem property is read-only. How can I change the first visible item
with AxTree1 do begin BeginUpdate(); MarkSearchColumn := False; ColumnAutoResize := False; ContinueColumnScroll := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); with (Columns.Add('Pos') as EXTREELib.Column) do begin Position := 0; FormatColumn := '0 index ``'; Width := 32; Def[EXTREELib.DefColumnEnum.exCellBackColor] := TObject(15790320); end; set_ScrollPos(True,13); EndUpdate(); end |
586 |
How FullPath method works
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; Columns.Add('C1'); Columns.Add('C2'); with Items do begin h := AddItem('Root'); CellCaption[TObject(h),TObject(1)] := 'A'; CellCaption[TObject(InsertItem(h,Nil,'Child 1')),TObject(1)] := 'B'; CellCaption[TObject(InsertItem(h,Nil,'Child 2')),TObject(1)] := 'C'; ExpandItem[h] := True; end; SearchColumnIndex := 1; OutputDebugString( SearchColumnIndex ); OutputDebugString( Items.FullPath[.ItemByIndex[2]] ); SearchColumnIndex := 0; OutputDebugString( SearchColumnIndex ); OutputDebugString( Items.FullPath[.ItemByIndex[2]] ); EndUpdate(); end |
585 |
How can I filter for multiple captions on a single column, using OR clause
with AxTree1 do begin BeginUpdate(); ColumnAutoResize := True; ContinueColumnScroll := False; MarkSearchColumn := True; SearchColumnIndex := 1; FilterBarPromptVisible := True; with Columns do begin (Add('Name') as EXTREELib.Column).Width := 96; with (Add('Title') as EXTREELib.Column) do begin Width := 96; end; Add('City'); end; with Items do begin h0 := AddItem('Nancy Davolio'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'Seattle'; h0 := AddItem('Andrew Fuller'); CellCaption[TObject(h0),TObject(1)] := 'Vice President, Sales'; CellCaption[TObject(h0),TObject(2)] := 'Tacoma'; SelectItem[h0] := True; h0 := AddItem('Janet Leverling'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'Kirkland'; h0 := AddItem('Margaret Peacock'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'Redmond'; h0 := AddItem('Steven Buchanan'); CellCaption[TObject(h0),TObject(1)] := 'Sales Manager'; CellCaption[TObject(h0),TObject(2)] := 'London'; h0 := AddItem('Michael Suyama'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'London'; h0 := AddItem('Robert King'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'London'; h0 := AddItem('Laura Callahan'); CellCaption[TObject(h0),TObject(1)] := 'Inside Sales Coordinator'; CellCaption[TObject(h0),TObject(2)] := 'Seattle'; h0 := AddItem('Anne Dodsworth'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'London'; end; FilterBarPromptColumns := '1'; FilterBarPromptPattern := 'Vice Inside'; FilterBarPromptType := EXTREELib.FilterPromptEnum.exFilterPromptContainsAny; EndUpdate(); end |
584 |
How can I filter for multiple captions on a single column, using AND clause
with AxTree1 do begin BeginUpdate(); ColumnAutoResize := True; ContinueColumnScroll := False; MarkSearchColumn := True; SearchColumnIndex := 1; FilterBarPromptVisible := True; with Columns do begin (Add('Name') as EXTREELib.Column).Width := 96; with (Add('Title') as EXTREELib.Column) do begin Width := 96; end; Add('City'); end; with Items do begin h0 := AddItem('Nancy Davolio'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'Seattle'; h0 := AddItem('Andrew Fuller'); CellCaption[TObject(h0),TObject(1)] := 'Vice President, Sales'; CellCaption[TObject(h0),TObject(2)] := 'Tacoma'; SelectItem[h0] := True; h0 := AddItem('Janet Leverling'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'Kirkland'; h0 := AddItem('Margaret Peacock'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'Redmond'; h0 := AddItem('Steven Buchanan'); CellCaption[TObject(h0),TObject(1)] := 'Sales Manager'; CellCaption[TObject(h0),TObject(2)] := 'London'; h0 := AddItem('Michael Suyama'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'London'; h0 := AddItem('Robert King'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'London'; h0 := AddItem('Laura Callahan'); CellCaption[TObject(h0),TObject(1)] := 'Inside Sales Coordinator'; CellCaption[TObject(h0),TObject(2)] := 'Seattle'; h0 := AddItem('Anne Dodsworth'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'London'; end; FilterBarPromptColumns := '1'; FilterBarPromptPattern := 'Vice Sales'; FilterBarPromptType := EXTREELib.FilterPromptEnum.exFilterPromptContainsAll; EndUpdate(); end |
583 |
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
with AxTree1 do begin BeginUpdate(); ColumnAutoResize := True; ContinueColumnScroll := False; MarkSearchColumn := False; SearchColumnIndex := 1; FilterBarHeight := 0; FilterBarPromptVisible := True; with Columns do begin (Add('Name') as EXTREELib.Column).Width := 96; (Add('Title') as EXTREELib.Column).Width := 96; Add('City'); end; with Items do begin h0 := AddItem('Nancy Davolio'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'Seattle'; h0 := AddItem('Andrew Fuller'); CellCaption[TObject(h0),TObject(1)] := 'Vice President, Sales'; CellCaption[TObject(h0),TObject(2)] := 'Tacoma'; SelectItem[h0] := True; h0 := AddItem('Janet Leverling'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'Kirkland'; h0 := AddItem('Margaret Peacock'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'Redmond'; h0 := AddItem('Steven Buchanan'); CellCaption[TObject(h0),TObject(1)] := 'Sales Manager'; CellCaption[TObject(h0),TObject(2)] := 'London'; h0 := AddItem('Michael Suyama'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'London'; h0 := AddItem('Robert King'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'London'; h0 := AddItem('Laura Callahan'); CellCaption[TObject(h0),TObject(1)] := 'Inside Sales Coordinator'; CellCaption[TObject(h0),TObject(2)] := 'Seattle'; h0 := AddItem('Anne Dodsworth'); CellCaption[TObject(h0),TObject(1)] := 'Sales Representative'; CellCaption[TObject(h0),TObject(2)] := 'London'; end; FilterBarPromptPattern := 'London'; EndUpdate(); end |
582 |
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxTree1_AddItem(sender: System.Object; e: AxEXTREELib._ITreeEvents_AddItemEvent); begin with AxTree1 do begin with Items do begin SetParent(e.item,FindItem[CellCaption[TObject(e.item),'ReportsTo'],'EmployeeID',Nil]); end; end end; with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; ColumnAutoResize := False; ContinueColumnScroll := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('SELECT * FROM Employees ORDER BY ReportsTo','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); Items.ExpandItem[0] := True; EndUpdate(); end |
581 |
Is there any option to control where I can drop the items when using the AutoDrag property
// AllowAutoDrag event - Occurs when the user drags the item between InsertA and InsertB as child of NewParent. procedure TWinForm1.AxTree1_AllowAutoDrag(sender: System.Object; e: AxEXTREELib._ITreeEvents_AllowAutoDragEvent); begin with AxTree1 do begin with Items do begin OutputDebugString( 'NewParent' ); OutputDebugString( CellCaption[TObject(e.newParent),TObject(0)] ); OutputDebugString( 'After' ); OutputDebugString( CellCaption[TObject(e.insertA),TObject(0)] ); OutputDebugString( 'Before' ); OutputDebugString( CellCaption[TObject(e.insertB),TObject(0)] ); end; e.cancel := True; end end; with AxTree1 do begin BeginUpdate(); AutoDrag := EXTREELib.AutoDragEnum.exAutoDragPositionAny; LinesAtRoot := EXTREELib.LinesAtRootEnum.exNoLinesAtRoot; HasLines := EXTREELib.HierarchyLineEnum.exThinLine; ShowFocusRect := False; Columns.Add('Task'); with Items do begin h := AddItem('Group 1'); ItemDivider[h] := 0; ItemBold[h] := True; h1 := InsertItem(h,Nil,'Task 1'); h2 := InsertItem(h,Nil,'Task 2'); h3 := InsertItem(h,Nil,'Task 3'); ExpandItem[h] := True; h := AddItem('Group 2'); ItemBold[h] := True; ItemDivider[h] := 0; end; EndUpdate(); end |
580 |
The FindPath is not case sensitive. How can I make it work case sensitive
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; Columns.Add('Default'); ASCIIUpper := ''; with Items do begin h := AddItem('L:'); InsertItem(h,Nil,'test'); InsertItem(h,Nil,'Test'); InsertItem(h,Nil,'TEST'); ExpandItem[h] := True; ItemBold[FindPath['L:\TEST']] := True; end; EndUpdate(); end |
579 |
How do I enable / display a tooltip while user selects new items from the drop down filter panel
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; with (Columns.Add('Items') as EXTREELib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; FilterList := Integer(EXTREELib.FilterListEnum.exShowExclude) Or Integer(EXTREELib.FilterListEnum.exEnableToolTip) Or Integer(EXTREELib.FilterListEnum.exShowFocusItem) Or Integer(EXTREELib.FilterListEnum.exShowCheckBox); end; with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 4'); end; with Columns.Item[TObject(0)] do begin FilterType := Integer(EXTREELib.FilterTypeEnum.exFilterExclude) Or Integer(EXTREELib.FilterTypeEnum.exFilter); Filter := 'Item 1|Item 4'; end; ApplyFilter(); EndUpdate(); end |
578 |
How can I align captions of items with checkbox, with items with no checkbox
with AxTree1 do begin BeginUpdate(); Columns.Add('Default'); with Items do begin CellImages[TObject(AddItem(TObject(0))),TObject(0)] := '1'; CellHasCheckBox[TObject(AddItem(TObject(1))),TObject(0)] := True; CellImages[TObject(AddItem(TObject(2))),TObject(0)] := '1'; end; EndUpdate(); end |
577 |
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
// MouseDown event - Occurs when the user presses a mouse button. procedure TWinForm1.AxTree1_MouseDownEvent(sender: System.Object; e: AxEXTREELib._ITreeEvents_MouseDownEvent); begin // Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit)) end; with AxTree1 do begin BeginUpdate(); TreeColumnIndex := -1; SelForeColor := ForeColor; with (Columns.Add('Buttons') as EXTREELib.Column) do begin Alignment := EXTREELib.AlignmentEnum.CenterAlignment; Def[EXTREELib.DefColumnEnum.exCellHasButton] := TObject(True); end; with Items do begin AddItem('Button A'); AddItem('Button B'); AddItem('Button C'); end; EndUpdate(); end |
576 |
Does the title of the cell's tooltip supports HTML format
with AxTree1 do begin BeginUpdate(); with (Columns.Add('') as EXTREELib.Column) do begin Caption := ''; HTMLCaption := 'Column'; end; with Items do begin CellToolTip[TObject(AddItem('tooltip w/h different title')),TObject(0)] := '<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that''s shown when the user hovers the cell. This shows the titl' + 'e centered with a different color.'; end; EndUpdate(); end |
575 |
How do I specify a different title for the cell's tooltip
with AxTree1 do begin BeginUpdate(); with (Columns.Add('') as EXTREELib.Column) do begin Caption := 'This is the title'; HTMLCaption := 'Column'; end; with Items do begin CellToolTip[TObject(AddItem('tooltip w/h different title')),TObject(0)] := 'This is bit of text that''s shown when the user hovers the cell.'; end; EndUpdate(); end |
574 |
The cell's tooltip displays the column's caption in its title. How can I get ride of that
with AxTree1 do begin BeginUpdate(); with Columns do begin Add('C1'); Add('C2'); end; with Items do begin h := AddItem('tooltip w/h caption'); CellToolTip[TObject(h),TObject(0)] := 'This is bit of text that''s shown when the user hovers the cell. This shows the column''s caption in the title.'; CellCaption[TObject(h),TObject(1)] := 'tooltip no caption'; CellToolTip[TObject(h),TObject(1)] := 'This is bit of text that''s shown when the user hovers the cell. This shows no column''s caption in the title.'; end; with Columns.Item['C2'] do begin HTMLCaption := Caption; Caption := ''; end; EndUpdate(); end |
573 |
How can I programmatically show the column's filter
// RClick event - Fired when right mouse button is clicked procedure TWinForm1.AxTree1_RClick(sender: System.Object; e: System.EventArgs); begin with AxTree1 do begin i := get_ItemFromPoint(-1,-1,c,hit); Columns.Item[TObject(c)].ShowFilter('-1,-1,128,128'); end end; with AxTree1 do begin BeginUpdate(); ShowFocusRect := False; with (Columns.Add('Items ') as EXTREELib.Column) do begin DisplayFilterPattern := False; FilterList := Integer(EXTREELib.FilterListEnum.exShowExclude) Or Integer(EXTREELib.FilterListEnum.exShowFocusItem) Or Integer(EXTREELib.FilterListEnum.exShowCheckBox); end; with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); end; EndUpdate(); end |
572 |
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)
// ColumnClick event - Fired after the user clicks on column's header. procedure TWinForm1.AxTree1_ColumnClick(sender: System.Object; e: AxEXTREELib._ITreeEvents_ColumnClickEvent); begin // Column.SortOrder = 1 with AxTree1 do begin SortOnClick := EXTREELib.SortOnClickEnum.exDefaultSort; Columns.Item['Sort'].SortOrder := EXTREELib.SortOrderEnum.SortAscending; SortOnClick := EXTREELib.SortOnClickEnum.exUserSort; end end; with AxTree1 do begin BeginUpdate(); MarkSearchColumn := False; SortOnClick := EXTREELib.SortOnClickEnum.exUserSort; Columns.Add('Items'); (Columns.Add('Sort') as EXTREELib.Column).Visible := False; with Items do begin CellCaption[TObject(AddItem('Item 1 (3)')),TObject(1)] := TObject(3); CellCaption[TObject(AddItem('Item 2 (1)')),TObject(1)] := TObject(1); CellCaption[TObject(AddItem('Item 3 (2)')),TObject(1)] := TObject(2); end; EndUpdate(); end |
571 |
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)
// ColumnClick event - Fired after the user clicks on column's header. procedure TWinForm1.AxTree1_ColumnClick(sender: System.Object; e: AxEXTREELib._ITreeEvents_ColumnClickEvent); begin // Column.SortOrder = 1 with AxTree1 do begin Items.SortChildren(0,'Sort',True); end end; with AxTree1 do begin BeginUpdate(); MarkSearchColumn := False; SortOnClick := EXTREELib.SortOnClickEnum.exUserSort; Columns.Add('Items'); (Columns.Add('Sort') as EXTREELib.Column).Visible := False; with Items do begin CellCaption[TObject(AddItem('Item 1 (3)')),TObject(1)] := TObject(3); CellCaption[TObject(AddItem('Item 2 (1)')),TObject(1)] := TObject(1); CellCaption[TObject(AddItem('Item 3 (2)')),TObject(1)] := TObject(2); end; EndUpdate(); end |
570 |
I have a 3 level hierarchy in the treeview, and I want to create a filter that only shows the items in the 2nd level of the hierarchy, is this possible
with AxTree1 do begin LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; MarkSearchColumn := False; Columns.Add('Items'); (Columns.Add('Level') as EXTREELib.Column).Visible := False; with Items do begin h := AddItem('Parent'); CellCaption[TObject(h),TObject(1)] := TObject(0); hChild := InsertItem(h,Nil,'Child 1.1'); CellCaption[TObject(hChild),TObject(1)] := TObject(1); hSubChild := InsertItem(hChild,Nil,'SubChild A'); CellCaption[TObject(hSubChild),TObject(1)] := TObject(2); hChild := InsertItem(h,Nil,'Child 1.2'); CellCaption[TObject(hChild),TObject(1)] := TObject(1); hSubChild := InsertItem(hChild,Nil,'SubChild B'); CellCaption[TObject(hSubChild),TObject(1)] := TObject(2); ExpandItem[h] := True; end; FilterInclude := EXTREELib.FilterIncludeEnum.exMatchingItemsOnly; with Columns.Item['Level'] do begin FilterType := EXTREELib.FilterTypeEnum.exFilter; Filter := 2; end; ApplyFilter(); end |
569 |
How can I sort by two-columns, one by date and one by time
with AxTree1 do begin BeginUpdate(); SingleSort := False; with Columns do begin (Add('Index') as EXTREELib.Column).FormatColumn := '1 index ``'; (Add('Date') as EXTREELib.Column).SortType := EXTREELib.SortTypeEnum.SortDate; with (Add('Time') as EXTREELib.Column) do begin SortType := EXTREELib.SortTypeEnum.SortTime; FormatColumn := 'time(value)'; end; end; with Items do begin h := AddItem(TObject(0)); CellCaption[TObject(h),TObject(1)] := '1/1/2001'; CellCaption[TObject(h),TObject(2)] := '1/1/2001 10:00:00 AM'; h := AddItem(TObject(0)); CellCaption[TObject(h),TObject(1)] := '12/31/2000'; CellCaption[TObject(h),TObject(2)] := '1/1/2001 10:00:00 AM'; h := AddItem(TObject(0)); CellCaption[TObject(h),TObject(1)] := '1/1/2001'; CellCaption[TObject(h),TObject(2)] := '1/1/2001 6:00:00 AM'; h := AddItem(TObject(0)); CellCaption[TObject(h),TObject(1)] := '12/31/2000'; CellCaption[TObject(h),TObject(2)] := '1/1/2001 8:00:00 AM'; h := AddItem(TObject(0)); CellCaption[TObject(h),TObject(1)] := '1/1/2001'; CellCaption[TObject(h),TObject(2)] := '1/1/2001 8:00:00 AM'; h := AddItem(TObject(0)); CellCaption[TObject(h),TObject(1)] := '12/31/2000'; CellCaption[TObject(h),TObject(2)] := '1/1/2001 6:00:00 AM'; end; Layout := 'multiplesort="C1:1 C2:1"'; EndUpdate(); end |
568 |
We are using custom buttons for the +/- on the treeview control, is there a way to control the size of the image
with AxTree1 do begin BeginUpdate(); with VisualAppearance do begin Add(3,'gBFLBCJwBAEHhEJAAChABDEMACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSKUOQTDKMIziaQIRg8JYlDTJcIjKKEVQHFiXIrAKKwEgmEQMQiCcbzXI' + 'UBxAAqVZZFUaKAi+Qg4TLBAzUSAAYhtHqeJBjID4JA6UJXRpIAIQSSBUjGOg6TiMUYZAguAxCEzZUT0fAYUQSCC3ZzDCKoRpiCT7Xg8V5OVbjUz9P7AMBwLA7erxap6P' + 'JeD54QymGp/R5eMhyLI8UxXFqRY6veKtJhGDIrT5CEIQVA9EyXJqnahqOiaCguPorQy/dYYdg2BYBPS6MAvG4bVrOd59XrgN42fY2ByzAqlMQwS7rOqiY6YWTnehWToH' + 'E+JZUmoLB5CufQuAkBYkGO+ZrDWAo7keZZyHmH5+i8X4bluaJyHgGB9mQHx3JjBpViqJRHmueZ7H8Xo3i2fYAl+d5tncMRfDcdZeDMDIjCCJwokoEoQiEJ4KCIfIdgUS' + 'ZIAWaoGCEUh2BIJ4gnKBgMDICAnHoCggg0Aw4k0KAJkIagaguYwIj4LAmiKEw2CUIIiHMUJSDQSYyGCFYMGQCJCD0JRjiMRg3gmTYjGSVgmgkchSD4JJklIRIXCSSQYj' + '4U4UgkQhGE+EwJEkJJWhGpgGGIOBNmMdhPg8SRiHCGAlibNhohqJpJi4T4ZA2WYIgEYInGOGJlDkCQyECDoTEkKQ+E+C5oCIVhQCUCQpnSDoeg4SZZH8YdhjibQ7AiUg' + 'kgcJFyiyEYmGmOhqhyJ5pmILoYCKaRSB6Eg7CcZgZggaRqHqNoTiuDpKkKMormsQ4xiUYgYiKEo6CCWgWiqPovloZoGjoKQYiQBCAg=='); Add(4,'gBFLBCJwBAEHhEJAAChABDcMACAADACAxRDQNABQKAAzQFAYbBkGqGAAGIYxYgmFgAQhFcZQSKUOQTDKMIziaQIRg8JYlDTJcIjKKEVQHFiXIrAKKwEgmEQMQiCcbzXI' + 'UBxAAqVZZFUaKAi+Qg4TLBAzUSAAYhtHqeJBjID4JA6UJXRpIAIQSSBUjGOg6TiMUYZAguAxCEzZUT0fAYUQSCC3ZzDCKoRpiCT7Xg8V5OVbjUz9P7AMBwLA7erxap6P' + 'JeD54QymGp/R5eMhyLI8UxXFqRY6veKtJhGDIrT5CEIQVA9EyXJqnahqOiaCguPorQy/dYYdg2BYBPS6MAvG4bVrOd59XrgN42fY2ByzAqlMQwS7rOqiY6YWTnehWToH' + 'E+JZUmoLB5CufQuAkBYkGO+ZrDWAo7keZZyHmPQ+g8X4fluYBhneEB9l0Iwpg6RRWiqFQfg+V5nnefh/GAB5yAIfRMFeRZdHeDJDCiSApkoMoEiQKBJmKCIfCcYQiHIF' + 'YFkmeBaBOA5JmgMIhgITICAmXoBkgIxAk4MxKAIcIaD+YpIjYLoLmMCI2CkJoiGMNgiCCIhDFCUg0EmMhghWDBkAkBg9CUY4jEYN4JA2IxklYJoJHIUg+CSZJSESFwkm' + 'UKRSFOFRlCIUIRhOZJCFISQ1iQdgEgGGJOBMeJdhOY5SFiHAmAkaYmG6GwmhmLhthsJJ5hSXYYkgFgKHgOYOFOEITCQCJpDSEoTmgQhUhOIRoHoGoCh+SJpnCZIeBedg' + 'aHgO4OlOMINCISByECDQikkGhuh2JwpmqBogCKaYiC6FwhmkQ4yHgYYYgaFopiuaRakCbIsisSpGjYOwaFYIYKCkK5CA2IRqiwCwFiYaBrkKEYKEAQCAgA=='); Add(1,'CP:3 -4 -4 4 4'); Add(2,'CP:4 -4 -4 4 4'); end; DefaultItemHeight := 22; LinesAtRoot := EXTREELib.LinesAtRootEnum.exGroupLinesAtRoot; HasButtons := EXTREELib.ExpandButtonEnum.exCustom; set_HasButtonsCustom(False,16777216); set_HasButtonsCustom(True,33554432); Columns.Add('Column'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child'); end; EndUpdate(); end |
567 |
How can I connect to a DBF file
with AxTree1 do begin BeginUpdate(); ColumnAutoResize := False; ContinueColumnScroll := False; MarkSearchColumn := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset); with rs do begin Open('Select * From foxcode.DBF','Provider=vfpoledb;Data Source=C:\Program Files\Microsoft Visual FoxPro 9\',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); EndUpdate(); end |
566 |
Do you have any Fit-To-Page options when printing the control
with AxTree1 do begin BeginUpdate(); ColumnAutoResize := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); EndUpdate(); with (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.Print')) as EXPRINTLib.Print) do begin Options := 'FitToPage = On'; PrintExt := (AxTree1.GetOcx() as EXTREELib.Tree).DefaultDispatch; Preview(); end; end |
565 |
Does your control supports scrolling by touching the screen
with AxTree1 do begin BeginUpdate(); ColumnAutoResize := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); AutoDrag := Integer(EXTREELib.AutoDragEnum.exAutoDragScrollOnShortTouch) Or Integer(EXTREELib.AutoDragEnum.exAutoDragScroll); ScrollBySingleLine := True; ContinueColumnScroll := True; EndUpdate(); end |
564 |
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control
with AxTree1 do begin (GetOcx() as EXTREELib.Tree).BackColorAlternate := $7ff0f0f0; Columns.Add('Column'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 4'); AddItem('Item 5'); end; end |
563 |
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange
// CellStateChanged event - Fired after cell's state has been changed. procedure TWinForm1.AxTree1_CellStateChanged(sender: System.Object; e: AxEXTREELib._ITreeEvents_CellStateChangedEvent); begin with AxTree1 do begin with Items do begin CellCaption[TObject(e.item),TObject(2)] := TObject(CellState[TObject(e.item),TObject(0)]); end; end end; with AxTree1 do begin BeginUpdate(); ShowFocusRect := False; MarkSearchColumn := False; SelBackMode := EXTREELib.BackModeEnum.exTransparent; var_ConditionalFormat := ConditionalFormats.Add('%2 != 0',Nil); with var_ConditionalFormat do begin Bold := True; ForeColor := $ff; ApplyTo := EXTREELib.FormatApplyToEnum.exFormatToItems; end; with (Columns.Add('') as EXTREELib.Column) do begin Def[EXTREELib.DefColumnEnum.exCellHasCheckBox] := TObject(True); Width := 16; AllowSizing := False; end; Columns.Add('Information'); (Columns.Add('Hidden') as EXTREELib.Column).Visible := False; with Items do begin CellCaption[TObject(AddItem('')),TObject(1)] := 'This is a bit of text associated'; h := AddItem(''); CellCaption[TObject(h),TObject(1)] := 'This is a bit of text associated'; CellState[TObject(h),TObject(0)] := 1; CellCaption[TObject(AddItem('')),TObject(1)] := 'This is a bit of text associated'; end; EndUpdate(); end |
562 |
How can I start editing the cell as soon as the user clicks a cell
// AfterCellEdit event - Occurs after data in the current cell is edited. procedure TWinForm1.AxTree1_AfterCellEdit(sender: System.Object; e: AxEXTREELib._ITreeEvents_AfterCellEditEvent); begin with AxTree1 do begin Items.CellCaption[TObject(e.item),TObject(e.colIndex)] := TObject(e.newCaption); end end; // CancelCellEdit event - Occurs if the edit operation is canceled. procedure TWinForm1.AxTree1_CancelCellEdit(sender: System.Object; e: AxEXTREELib._ITreeEvents_CancelCellEditEvent); begin with AxTree1 do begin Items.CellCaption[TObject(e.item),TObject(e.colIndex)] := TObject(e.reserved); end end; // Click event - Occurs when the user presses and then releases the left mouse button over the tree control. procedure TWinForm1.AxTree1_ClickEvent(sender: System.Object; e: System.EventArgs); begin with AxTree1 do begin with Items do begin Edit(TObject(FocusItem),TObject(0)); end; end end; with AxTree1 do begin AllowEdit := True; Columns.Add('Column'); Items.AddItem('Item 1'); Items.AddItem('Item 2'); Items.AddItem(''); end |
561 |
How do I programmatically exclude items from the filter
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; with (Columns.Add('Items') as EXTREELib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; FilterList := Integer(EXTREELib.FilterListEnum.exShowExclude) Or Integer(EXTREELib.FilterListEnum.exShowFocusItem) Or Integer(EXTREELib.FilterListEnum.exShowCheckBox); end; with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 4'); end; with Columns.Item[TObject(0)] do begin FilterType := Integer(EXTREELib.FilterTypeEnum.exFilterExclude) Or Integer(EXTREELib.FilterTypeEnum.exFilter); Filter := 'Item 1|Item 4'; end; ApplyFilter(); EndUpdate(); end |
560 |
How can I sort the columns to be displayed on the columns floating bar
with AxTree1 do begin ColumnAutoResize := False; with Columns do begin (Add('City') as EXTREELib.Column).Visible := False; (Add('Start') as EXTREELib.Column).Visible := False; (Add('End') as EXTREELib.Column).Visible := False; end; ColumnsFloatBarVisible := EXTREELib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; ColumnsFloatBarSortOrder := EXTREELib.SortOrderEnum.SortAscending; end |
559 |
How can I add a vertical padding
with AxTree1 do begin BeginUpdate(); DrawGridLines := EXTREELib.GridLinesEnum.exAllLines; with (Columns.Add('Padding') as EXTREELib.Column) do begin Def[EXTREELib.DefColumnEnum.exCellHasCheckBox] := TObject(True); Def[EXTREELib.DefColumnEnum.exCellSingleLine] := TObject(False); Def[EXTREELib.DefColumnEnum.exCellPaddingLeft] := TObject(6); Def[EXTREELib.DefColumnEnum.exCellPaddingRight] := TObject(6); Def[EXTREELib.DefColumnEnum.exCellPaddingTop] := TObject(6); Def[EXTREELib.DefColumnEnum.exCellPaddingBottom] := TObject(6); end; with Items do begin AddItem('padding'); AddItem('padding'); end; EndUpdate(); end |
558 |
Is the PutItems method running .AddItem event
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxTree1_AddItem(sender: System.Object; e: AxEXTREELib._ITreeEvents_AddItemEvent); begin with AxTree1 do begin OutputDebugString( 'Adding ...' ); OutputDebugString( Items.CellCaption[TObject(e.item),TObject(0)] ); end end; with AxTree1 do begin LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; Columns.Add('Def'); with Items do begin h := AddItem('Root'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); end; OutputDebugString( 'Call PutItems' ); PutItems(GetItems(TObject(-1)),Nil); end |
557 |
How do you embed HTML options into the anchor click string
// AnchorClick event - Occurs when an anchor element is clicked. procedure TWinForm1.AxTree1_AnchorClick(sender: System.Object; e: AxEXTREELib._ITreeEvents_AnchorClickEvent); begin with AxTree1 do begin OutputDebugString( e.anchorID ); OutputDebugString( e.options ); end end; with AxTree1 do begin BeginUpdate(); with Columns do begin (Add('Car') as EXTREELib.Column).Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); end; with Items do begin AddItem('<a mazda_1;options for 1>Mazda <b>1</b></a>'); AddItem('<a mazda_2;options for 2>Mazda <b>2</b></a>'); AddItem('<a mazda_3;options for 3a>Mazda <b>3.a</b></a>'); AddItem('<a mazda_3;options for 3b>Mazda <b>3.b</b></a>'); end; EndUpdate(); end |
556 |
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)
with AxTree1 do begin BeginUpdate(); VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78eg' + 'BHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRxL' + 'C8Mw3BDvYDkOAABAIgI='); (GetOcx() as EXTREELib.Tree).SelBackColor := $1fffffe; ShowFocusRect := False; Columns.Add('Items'); with Items do begin ItemBackColor[AddItem('red')] := $ff; ItemBackColor[AddItem('blue')] := $ff0000; ItemBackColor[AddItem('green')] := $ff00; end; EndUpdate(); end |
555 |
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)
with AxTree1 do begin BeginUpdate(); SelBackMode := EXTREELib.BackModeEnum.exTransparent; ShowFocusRect := False; Columns.Add('Items'); with Items do begin ItemBackColor[AddItem('red')] := $ff; ItemBackColor[AddItem('blue')] := $ff0000; ItemBackColor[AddItem('green')] := $ff00; end; EndUpdate(); end |
554 |
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)
with AxTree1 do begin BeginUpdate(); SelBackColor := BackColor; SelForeColor := ForeColor; ShowFocusRect := True; Columns.Add('Items'); with Items do begin ItemBackColor[AddItem('red')] := $ff; ItemBackColor[AddItem('blue')] := $ff0000; ItemBackColor[AddItem('green')] := $ff00; end; EndUpdate(); end |
553 |
How do I arrange my columns on multiple levels
with AxTree1 do begin BeginUpdate(); ColumnAutoResize := False; DrawGridLines := EXTREELib.GridLinesEnum.exAllLines; with Columns do begin with (Add('C0') as EXTREELib.Column) do begin ExpandColumns := '1,2'; DisplayExpandButton := False; end; Add('C1'); Add('C2'); Add('C3'); with (Add('C4') as EXTREELib.Column) do begin ExpandColumns := '5,6'; DisplayExpandButton := False; end; Add('C5'); with (Add('C6') as EXTREELib.Column) do begin ExpandColumns := '6,7'; DisplayExpandButton := False; end; Add('C7'); end; EndUpdate(); end |
552 |
Does your control support expandable header or columns, so I can arrange it on multiple levels
with AxTree1 do begin BeginUpdate(); DrawGridLines := EXTREELib.GridLinesEnum.exAllLines; BackColorLevelHeader := Color.FromArgb(240,240,240); with Columns do begin with (Add('Photo') as EXTREELib.Column) do begin AllowSizing := False; Width := 32; end; Add('Personal Info'); Add('Title'); Add('Name'); Add('First'); Add('Last'); Add('Address'); Item['Personal Info'].ExpandColumns := '2,3'; with Item['Name'] do begin ExpandColumns := '4,5'; Expanded := False; end; end; EndUpdate(); end |
551 |
Does your control support subscript or superscript, in HTML captions
with AxTree1 do begin ColumnAutoResize := False; HeaderHeight := 28; DefaultItemHeight := 24; with Columns do begin with (Add('Column 1') as EXTREELib.Column) do begin HTMLCaption := 'Column <b><off 2><font ;6>1'; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); end; with (Add('Column 2') as EXTREELib.Column) do begin HTMLCaption := 'Column <b><off 2><font ;6>2'; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); end; with (Add('Column 3') as EXTREELib.Column) do begin HTMLCaption := 'Column <b><off 2><font ;6>3'; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); end; end; with Items do begin h := AddItem('Item <font ;6><off 4>1'); CellCaption[TObject(h),TObject(1)] := 'Item <font ;6><off -6>2'; CellCaption[TObject(h),TObject(2)] := 'Item <b><font ;6><off -6>2<off 4>3<off 4>1'; end; end |
550 |
Is there any property I can save and restore automatically the current setting, column position, size, and so on (2)
with AxTree1 do begin BeginUpdate(); Columns.Add('Column'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); end; Layout := 'Select="0";SingleSort="C0:2";Columns=1'; EndUpdate(); end |
549 |
Is there any property I can save and restore automatically the current setting, column position, size, and so on (1)
with AxTree1 do begin BeginUpdate(); Columns.Add('Column'); with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); end; Layout := 'gBjAAwAAuABmABpABsAB0ABlAByhoAPIAOEPAA9gYABoABQAgUEg0XN4AOcJicKkpujMbjsfkMFk0YhkQgUOjUEl8gjcGO0ok8KMULjEaGMcj08kQAO8oMkTNEtGwAGQ' + 'Aqc7gUlhh1ABtAEsk9GpEfhElgVcsMupNlnlonlaAFcr0shUsp8QPEtnVJqJhmcIhUMh0QiU5sYAqMngUSuEMw07k8Qv0SgVRrNEuVflF2jF5x9JyNEm0TjQijemyE0j' + 'E3t+YruauoAu4Az1qj9BzRn0UzksSnAA0xDjY6qnAw8OiUQ0dwzN0zWz2t7j8/xURAGNvWH6k8xlEhklhEI0O/6QAgI='; EndUpdate(); end |
548 |
I have noticed that the column's header is changed once the cursor hovers it. Is it possible to change that visual appearance
|
547 |
Is it possible to change the visual appearance of the columns selector/floating bar(3)
with AxTree1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXTREELib.Column).Visible := False; end; VisualAppearance.Add(2,'c:\exontrol\images\normal.ebn'); VisualAppearance.Add(3,'c:\exontrol\images\pushed.ebn'); set_Background(EXTREELib.BackgroundPartEnum.exColumnsFloatAppearance,$2000000); set_Background(EXTREELib.BackgroundPartEnum.exColumnsFloatBackColor,$3000000); set_Background(EXTREELib.BackgroundPartEnum.exColumnsFloatCaptionBackColor,$f0f5f6); ColumnsFloatBarVisible := EXTREELib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
546 |
Is it possible to change the visual appearance of the columns selector/floating bar(2)
with AxTree1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXTREELib.Column).Visible := False; end; VisualAppearance.Add(3,'c:\exontrol\images\pushed.ebn'); set_Background(EXTREELib.BackgroundPartEnum.exColumnsFloatBackColor,$3000000); ColumnsFloatBarVisible := EXTREELib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
545 |
Is it possible to change the visual appearance of the columns selector/floating bar(1)
|
544 |
I am using the ColumnsFloatBarVisible property on True, but still not able to add any column on that list
with AxTree1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXTREELib.Column).Visible := False; end; ColumnsFloatBarVisible := EXTREELib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
543 |
Is it possible to list a column to columns selector/floating bar, but still user can use it
with AxTree1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXTREELib.Column).Visible := False; with (Add('Column 3') as EXTREELib.Column) do begin Visible := False; Enabled := False; end; end; ColumnsFloatBarVisible := EXTREELib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
542 |
How can I prevent a specific column not to be listed in the columns selector/floating bar
with AxTree1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXTREELib.Column).Visible := False; with (Add('Column 3') as EXTREELib.Column) do begin Visible := False; AllowDragging := False; end; end; ColumnsFloatBarVisible := EXTREELib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
541 |
Is it possible to change the "Columns" caption being shown in the columns selector/floating bar
with AxTree1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXTREELib.Column).Visible := False; end; set_Description(EXTREELib.DescriptionTypeEnum.exColumnsFloatBar,'Hidden Columns'); ColumnsFloatBarVisible := EXTREELib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
540 |
How can I show the columns selector, so the user can drag and drop columns to the view
with AxTree1 do begin ColumnAutoResize := False; with Columns do begin Add('Column 1'); (Add('Column 2') as EXTREELib.Column).Visible := False; end; ColumnsFloatBarVisible := EXTREELib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; end |
539 |
The column's header is changed while the cursor hovers it. Is it possible to prevent that
|
538 |
Is there any public method to export the selected data
with AxTree1 do begin BeginUpdate(); MarkSearchColumn := False; with Columns do begin Add('C1'); (Add('C2') as EXTREELib.Column).FormatColumn := '1 index `A-Z`'; (Add('C3') as EXTREELib.Column).FormatColumn := '100 index ``'; end; with Items do begin AddItem('Item 1'); SelectItem[AddItem('Item 2')] := True; AddItem('Item 3'); end; EndUpdate(); OutputDebugString( 'Export CSV Selected Items Only:' ); OutputDebugString( Export('','sel') ); end |
537 |
Is it possible to auto-numbering the children items but still keeps the position after filtering
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; with (Columns.Add('Items') as EXTREELib.Column) do begin DisplayFilterButton := True; FilterType := EXTREELib.FilterTypeEnum.exFilter; Filter := 'Child 2'; end; with (Columns.Add('Pos.1') as EXTREELib.Column) do begin FormatColumn := '1 ropos '''''; Position := 0; Width := 32; AllowSizing := False; end; with (Columns.Add('Pos.2') as EXTREELib.Column) do begin FormatColumn := '1 ropos '':'''; Position := 1; Width := 32; AllowSizing := False; end; with (Columns.Add('Pos.3') as EXTREELib.Column) do begin FormatColumn := '1 ropos '':|A-Z'''; Position := 2; Width := 32; AllowSizing := False; end; with (Columns.Add('Pos.4') as EXTREELib.Column) do begin FormatColumn := '1 ropos ''|A-Z|'''; Position := 3; Width := 32; AllowSizing := False; end; with (Columns.Add('Pos.5') as EXTREELib.Column) do begin FormatColumn := '''<font Tahoma;7>'' + 1 ropos ''-<b>||A-Z'''; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); Position := 4; Width := 32; AllowSizing := False; end; with (Columns.Add('Pos.6') as EXTREELib.Column) do begin FormatColumn := '''<b>''+ 1 ropos ''</b>:<fgcolor=FF0000>|A-Z|'''; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); Position := 5; Width := 48; AllowSizing := False; end; with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); end; ApplyFilter(); EndUpdate(); end |
536 |
Is it possible to auto-numbering the children items too
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; Columns.Add('Items'); with (Columns.Add('Pos.1') as EXTREELib.Column) do begin FormatColumn := '1 rpos '''''; Position := 0; Width := 32; AllowSizing := False; end; with (Columns.Add('Pos.2') as EXTREELib.Column) do begin FormatColumn := '1 rpos '':'''; Position := 1; Width := 32; AllowSizing := False; end; with (Columns.Add('Pos.3') as EXTREELib.Column) do begin FormatColumn := '1 rpos '':|A-Z'''; Position := 2; Width := 32; AllowSizing := False; end; with (Columns.Add('Pos.4') as EXTREELib.Column) do begin FormatColumn := '1 rpos ''|A-Z|'''; Position := 3; Width := 32; AllowSizing := False; end; with (Columns.Add('Pos.5') as EXTREELib.Column) do begin FormatColumn := '''<font Tahoma;7>'' + 1 rpos ''-<b>||A-Z'''; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); Position := 4; Width := 32; AllowSizing := False; end; with (Columns.Add('Pos.6') as EXTREELib.Column) do begin FormatColumn := '''<b>''+ 1 rpos ''</b>:<fgcolor=FF0000>|A-Z|'''; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); Position := 5; Width := 48; AllowSizing := False; end; with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); end; EndUpdate(); end |
535 |
How can I find if there is any filter applied to the control
// FilterChange event - Notifies your application that the filter is changed. procedure TWinForm1.AxTree1_FilterChange(sender: System.Object; e: System.EventArgs); begin with AxTree1 do begin OutputDebugString( 'If negative, the filter is present, else not' ); OutputDebugString( Items.VisibleItemCount ); end end; with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; TreeColumnIndex := -1; FilterInclude := EXTREELib.FilterIncludeEnum.exMatchingItemsOnly; with (Columns.Add('Column') as EXTREELib.Column) do begin DisplayFilterButton := True; FilterType := EXTREELib.FilterTypeEnum.exFilter; Filter := 'C1'; end; with Items do begin h := AddItem('R1'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); ExpandItem[h] := True; h := AddItem('R2'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); end; ApplyFilter(); EndUpdate(); end |
534 |
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; TreeColumnIndex := -1; FilterInclude := EXTREELib.FilterIncludeEnum.exMatchingItemsOnly; with (Columns.Add('Column') as EXTREELib.Column) do begin DisplayFilterButton := True; FilterType := EXTREELib.FilterTypeEnum.exFilter; Filter := 'C1|C2'; end; with Items do begin h := AddItem('R1'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); ExpandItem[h] := True; h := AddItem('R2'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); end; ApplyFilter(); EndUpdate(); end |
533 |
Is there any method to get only the matched items and not the items with his parent
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; FilterInclude := EXTREELib.FilterIncludeEnum.exMatchingItemsOnly; with (Columns.Add('Column') as EXTREELib.Column) do begin DisplayFilterButton := True; FilterType := EXTREELib.FilterTypeEnum.exFilter; Filter := 'C1|C2'; end; with Items do begin h := AddItem('R1'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); ExpandItem[h] := True; h := AddItem('R2'); InsertItem(h,Nil,'C1'); InsertItem(h,Nil,'C2'); end; ApplyFilter(); EndUpdate(); end |
532 |
How can I add or change the padding (spaces) for captions in the control's header
with AxTree1 do begin BeginUpdate(); (Columns.Add('Padding-Left') as EXTREELib.Column).Def[EXTREELib.DefColumnEnum.exHeaderPaddingLeft] := TObject(18); with (Columns.Add('Padding-Right') as EXTREELib.Column) do begin Def[EXTREELib.DefColumnEnum.exHeaderPaddingRight] := TObject(18); HeaderAlignment := EXTREELib.AlignmentEnum.RightAlignment; end; EndUpdate(); end |
531 |
Do you have any plans to add cell spacing and cell padding to the cells
with AxTree1 do begin BeginUpdate(); DrawGridLines := EXTREELib.GridLinesEnum.exRowLines; with (Columns.Add('Padding-Left') as EXTREELib.Column) do begin Def[EXTREELib.DefColumnEnum.exCellHasCheckBox] := TObject(True); Def[EXTREELib.DefColumnEnum.exCellPaddingLeft] := TObject(18); end; (Columns.Add('No-Padding') as EXTREELib.Column).Def[EXTREELib.DefColumnEnum.exCellHasCheckBox] := TObject(True); (Columns.Add('Empty') as EXTREELib.Column).Position := 0; with Items do begin CellCaption[TObject(AddItem('Item A.1')),TObject(1)] := 'Item A.2'; CellCaption[TObject(AddItem('Item B.1')),TObject(1)] := 'Item B.2'; CellCaption[TObject(AddItem('Item C.1')),TObject(1)] := 'Item C.2'; end; EndUpdate(); end |
530 |
Is it possible display numbers in the same format no matter of regional settings in the control panel
with AxTree1 do begin BeginUpdate(); (Columns.Add('Def') as EXTREELib.Column).Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); with Items do begin h := AddItem(TObject(100000.27)); FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default positive)'''; h := AddItem(TObject(100000.27)); FormatCell[TObject(h),TObject(0)] := '(value format ''2|.|3|,|1|1'')'; h := AddItem(TObject(-100000.27)); FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default negative)'''; h := AddItem(TObject(-100000.27)); FormatCell[TObject(h),TObject(0)] := '(value format ''2|.|3|,|1|1'')'; end; EndUpdate(); end |
529 |
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8
with AxTree1 do begin BeginUpdate(); (Columns.Add('Def') as EXTREELib.Column).Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); with Items do begin h := AddItem(TObject(0.27)); FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default)'''; h := AddItem(TObject(0.27)); FormatCell[TObject(h),TObject(0)] := '(value format ''|||||0'') + '' <fgcolor=808080>(Display no leading zeros)'''; end; EndUpdate(); end |
528 |
How can I specify the format for negative numbers
with AxTree1 do begin BeginUpdate(); (Columns.Add('Def') as EXTREELib.Column).Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); with Items do begin h := AddItem(TObject(-100000.27)); FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default)'''; h := AddItem(TObject(-100000.27)); FormatCell[TObject(h),TObject(0)] := '(value format ''||||1'') + '' <fgcolor=808080>(Negative sign, number; for example, -1.1)'''; end; EndUpdate(); end |
527 |
Is it possible to change the grouping character when display numbers
with AxTree1 do begin BeginUpdate(); (Columns.Add('Def') as EXTREELib.Column).Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); with Items do begin h := AddItem(TObject(100000.27)); FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default)'''; h := AddItem(TObject(100000.27)); FormatCell[TObject(h),TObject(0)] := '(value format ''|||-'') + '' <fgcolor=808080>(grouping character is -)'''; end; EndUpdate(); end |
526 |
How can I display numbers with 2 digits in each group
with AxTree1 do begin BeginUpdate(); (Columns.Add('Def') as EXTREELib.Column).Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); with Items do begin h := AddItem(TObject(100000.27)); FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default)'''; h := AddItem(TObject(100000.27)); FormatCell[TObject(h),TObject(0)] := '(value format ''||2'') + '' <fgcolor=808080>(grouping by 2 digits)'''; end; EndUpdate(); end |
525 |
How can I display my numbers using a different decimal separator
with AxTree1 do begin BeginUpdate(); (Columns.Add('Def') as EXTREELib.Column).Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); with Items do begin h := AddItem(TObject(100.27)); FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default)'''; h := AddItem(TObject(100.27)); FormatCell[TObject(h),TObject(0)] := '(value format ''|;'') + '' <fgcolor=808080>(decimal separator is <b>;</b>)'''; end; EndUpdate(); end |
524 |
Is it possible to display the numbers using 3 (three) digits
with AxTree1 do begin BeginUpdate(); (Columns.Add('Def') as EXTREELib.Column).Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); with Items do begin h := AddItem(TObject(100.27)); FormatCell[TObject(h),TObject(0)] := '(value format '''') + '' <fgcolor=808080>(default)'''; h := AddItem(TObject(100.27)); FormatCell[TObject(h),TObject(0)] := '(value format ''3'') + '' <fgcolor=808080>(3 digits)'''; h := AddItem(TObject(100.27)); FormatCell[TObject(h),TObject(0)] := '(value format 2) + '' <fgcolor=808080>(2 digits)'''; h := AddItem(TObject(100.27)); FormatCell[TObject(h),TObject(0)] := '(value format 1) + '' <fgcolor=808080>(1 digit)'''; end; EndUpdate(); end |
523 |
Is it possible to format numbers
with AxTree1 do begin BeginUpdate(); MarkSearchColumn := False; with Columns do begin Add('Name'); with (Add('A') as EXTREELib.Column) do begin SortType := EXTREELib.SortTypeEnum.SortNumeric; AllowSizing := False; Width := 36; FormatColumn := 'len(value) ? value + '' +'''; end; with (Add('B') as EXTREELib.Column) do begin SortType := EXTREELib.SortTypeEnum.SortNumeric; AllowSizing := False; Width := 36; FormatColumn := 'len(value) ? value + '' +'''; end; with (Add('C') as EXTREELib.Column) do begin SortType := EXTREELib.SortTypeEnum.SortNumeric; AllowSizing := False; Width := 36; FormatColumn := 'len(value) ? value + '' ='''; end; with (Add('A+B+C') as EXTREELib.Column) do begin SortType := EXTREELib.SortTypeEnum.SortNumeric; Width := 64; ComputedField := 'dbl(%1)+dbl(%2)+dbl(%3)'; FormatColumn := 'type(value) in (0,1) ? ''null'' : ( dbl(value)<0 ? ''<fgcolor=FF0000>''+ (value format ''2|.|3|,|1'' ) : (dbl(value)>0 ? ''<fgcolor=000' + '0FF>+''+(value format ''2|.|3|,'' ): ''0.00'') )'; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); end; end; with Items do begin h := AddItem('Root'); CellCaptionFormat[TObject(h),TObject(4)] := EXTREELib.CaptionFormatEnum.exComputedField; h1 := InsertItem(h,Nil,'Child 1'); CellCaption[TObject(h1),TObject(1)] := TObject(7); CellCaption[TObject(h1),TObject(2)] := TObject(3); CellCaption[TObject(h1),TObject(3)] := TObject(1); h1 := InsertItem(h,Nil,'Child 2'); CellCaption[TObject(h1),TObject(1)] := TObject(-2); CellCaption[TObject(h1),TObject(2)] := TObject(-2); CellCaption[TObject(h1),TObject(3)] := TObject(-4); h1 := InsertItem(h,Nil,'Child 3'); CellCaption[TObject(h1),TObject(1)] := TObject(2); CellCaption[TObject(h1),TObject(2)] := TObject(2); CellCaption[TObject(h1),TObject(3)] := TObject(-4); ExpandItem[h] := True; end; EndUpdate(); end |
522 |
I am using the FormatColumn/FormatCell to format my columns. Is it possible to ignore the SelForeColor, so the foreground color for selected items does not override my settings
// SelectionChanged event - Fired after a new item has been selected. procedure TWinForm1.AxTree1_SelectionChanged(sender: System.Object; e: System.EventArgs); begin with AxTree1 do begin with Items do begin ClearItemBackColor(0); ItemBackColor[SelectedItem[0]] := $ffff80; end; end end; with AxTree1 do begin BeginUpdate(); MarkSearchColumn := False; SelForeColor := ForeColor; SelBackColor := BackColor; ShowFocusRect := False; with Columns do begin with (Add('Format') as EXTREELib.Column) do begin FormatColumn := 'type(value) in (0,1) ? ''null'' : ( dbl(value)<0 ? ''<fgcolor=FF0000>''+ (value format ''2|.|3|,|1'' ) : (dbl(value)>0 ? ''<fgcolor=000' + '0FF>+''+(value format ''2|.|3|,'' ): ''0.00'') )'; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); end; end; with Items do begin AddItem(TObject(10)); AddItem(TObject(-8)); end; EndUpdate(); end |
521 |
Is it possible to change the height for all items at once
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; Columns.Add('Items'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); h := AddItem('Root 2'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[0] := True; end; EndUpdate(); DefaultItemHeight := 12; Items.ItemHeight[0] := 12; end |
520 |
How can I add a footer row
with AxTree1 do begin ShowLockedItems := True; DrawGridLines := EXTREELib.GridLinesEnum.exVLines; Columns.Add('C1'); Columns.Add('C2'); with Items do begin LockedItemCount[EXTREELib.VAlignmentEnum.BottomAlignment] := 1; h := LockedItem[EXTREELib.VAlignmentEnum.BottomAlignment,0]; ItemBackColor[h] := $808080; ItemForeColor[h] := $ffffff; CellCaption[TObject(h),TObject(0)] := 'footer c1'; CellCaption[TObject(h),TObject(1)] := 'footer c2'; CellCaption[TObject(AddItem('cell')),TObject(1)] := 'cell'; end; end |
519 |
How can I add a header row
with AxTree1 do begin ShowLockedItems := True; DrawGridLines := EXTREELib.GridLinesEnum.exVLines; Columns.Add('C1'); Columns.Add('C2'); with Items do begin LockedItemCount[EXTREELib.VAlignmentEnum.TopAlignment] := 1; h := LockedItem[EXTREELib.VAlignmentEnum.TopAlignment,0]; ItemBackColor[h] := $808080; ItemForeColor[h] := $ffffff; CellCaption[TObject(h),TObject(0)] := 'footer c1'; CellCaption[TObject(h),TObject(1)] := 'footer c2'; CellCaption[TObject(AddItem('cell')),TObject(1)] := 'cell'; end; end |
518 |
When I'm trying to show string with "line break" character (vbCrLF) in a textbox, it shows 2 squares. Is there any way to hide these squares
with AxTree1 do begin with Columns do begin Add('Value'); with (Add('CellSingleLine = False') as EXTREELib.Column) do begin ComputedField := '%0'; Def[EXTREELib.DefColumnEnum.exCellSingleLine] := TObject(False); end; with (Add('FormatColumn/replace CRLF') as EXTREELib.Column) do begin ComputedField := '%0'; FormatColumn := 'value replace `\r\n` with ``'; end; with (Add('FormatColumn/replace TAB,CRLF') as EXTREELib.Column) do begin ComputedField := '%0'; FormatColumn := '(value replace `\t` with ``) replace `\r\n` with ``'; end; end; with Items do begin AddItem('a\ta\r\nb\tb'); end; end |
517 |
Is there any way to "unselect" radio group
// DblClick event - Occurs when the user dblclk the left mouse button over an object. procedure TWinForm1.AxTree1_DblClick(sender: System.Object; e: AxEXTREELib._ITreeEvents_DblClickEvent); begin with AxTree1 do begin with Items do begin h := CellChecked[1234]; CellHasCheckBox[TObject(0),TObject(h)] := True; CellState[TObject(0),TObject(h)] := 0; CellHasCheckBox[TObject(0),TObject(h)] := False; end; end end; // SelectionChanged event - Fired after a new item has been selected. procedure TWinForm1.AxTree1_SelectionChanged(sender: System.Object; e: System.EventArgs); begin with AxTree1 do begin with Items do begin CellState[TObject(FocusItem),TObject(0)] := 1; end; end end; with AxTree1 do begin MarkSearchColumn := False; SelBackColor := Color.FromArgb(255,255,128); SelForeColor := Color.FromArgb(0,0,0); Columns.Add('Default'); with Items do begin h := AddItem('Radio 1'); CellHasRadioButton[TObject(h),TObject(0)] := True; CellRadioGroup[TObject(h),TObject(0)] := 1234; h := AddItem('Radio 2'); CellHasRadioButton[TObject(h),TObject(0)] := True; CellRadioGroup[TObject(h),TObject(0)] := 1234; CellState[TObject(h),TObject(0)] := 1; h := AddItem('Radio 3'); CellHasRadioButton[TObject(h),TObject(0)] := True; CellRadioGroup[TObject(h),TObject(0)] := 1234; end; end |
516 |
The Column.Alignment property does not seem to work for cells with images in them. What can be done
with AxTree1 do begin BeginUpdate(); Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); TreeColumnIndex := -1; DrawGridLines := EXTREELib.GridLinesEnum.exAllLines; HeaderHeight := 24; MarkSearchColumn := False; DefaultItemHeight := 24; with (Columns.Add('Image') as EXTREELib.Column) do begin AllowSizing := False; Width := 32; HTMLCaption := '<img>1</img>'; HeaderAlignment := EXTREELib.AlignmentEnum.CenterAlignment; Alignment := EXTREELib.AlignmentEnum.CenterAlignment; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); end; Columns.Add('Rest'); with Items do begin AddItem('<img>1</img>'); AddItem('<img>2</img>'); AddItem('<img>3</img>'); end; EndUpdate(); end |
515 |
Can I change the format of date to be shown in the control
with AxTree1 do begin with Columns do begin Add('Default'); with (Add('Format.1') as EXTREELib.Column) do begin ComputedField := '%0'; FormatColumn := 'dateF(value) replace `/` with `-`'; end; with (Add('Format.2') as EXTREELib.Column) do begin ComputedField := '%0'; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); FormatColumn := '`<b>`+ shortdate(value) + `</b> ` + timeF(value)'; end; with (Add('Format.3') as EXTREELib.Column) do begin ComputedField := '%0'; Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); FormatColumn := '( dateF(value) replace `/` with `-` ) + ` <b>`+ ( weekday(value) case ( 0 : `Su`; 1 : `Mo`; 2 : `Tu`; 3 : `We`; 4 : `Th`; 5 : `F' + 'r`; 6 : `Sa`) )'; end; end; with Items do begin AddItem('1/1/2001 10:00:00 AM'); AddItem('1/2/2001 10:00:00 AM'); end; end |
514 |
Is it possible to scroll the control's content by clicking and dragging
with AxTree1 do begin BeginUpdate(); ColumnAutoResize := False; ContinueColumnScroll := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); AutoDrag := EXTREELib.AutoDragEnum.exAutoDragScroll; EndUpdate(); end |
513 |
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a snapshot
with AxTree1 do begin BeginUpdate(); VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn'); set_HTMLPicture('p1','c:\exontrol\images\card.png'); set_HTMLPicture('p2','c:\exontrol\images\sun.png'); AutoDrag := EXTREELib.AutoDragEnum.exAutoDragCopySnapShot; LinesAtRoot := EXTREELib.LinesAtRootEnum.exNoLinesAtRoot; HasLines := EXTREELib.HierarchyLineEnum.exThinLine; ShowFocusRect := False; DefaultItemHeight := 26; Columns.Add('Task'); with Items do begin h := AddItem('<img>p1:32</img>Group 1'); CellCaptionFormat[TObject(h),TObject(0)] := EXTREELib.CaptionFormatEnum.exHTML; ItemDivider[h] := 0; ItemBold[h] := True; h1 := InsertItem(h,Nil,'Task 1'); h2 := InsertItem(h,Nil,'Task 2'); h3 := InsertItem(h,Nil,'Task 3'); h := AddItem('<img>p2:32</img>Group 2'); CellCaptionFormat[TObject(h),TObject(0)] := EXTREELib.CaptionFormatEnum.exHTML; ItemBold[h] := True; ItemDivider[h] := 0; h1 := InsertItem(h,Nil,'Task'); ExpandItem[0] := True; end; EndUpdate(); end |
512 |
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a image
with AxTree1 do begin BeginUpdate(); set_HTMLPicture('p1','c:\exontrol\images\card.png'); set_HTMLPicture('p2','c:\exontrol\images\sun.png'); var_HTMLPicture := get_HTMLPicture('aka1'); HeaderHeight := 24; DefaultItemHeight := 48; DrawGridLines := EXTREELib.GridLinesEnum.exRowLines; GridLineColor := Color.FromArgb(240,240,240); SelBackMode := EXTREELib.BackModeEnum.exTransparent; ColumnAutoResize := False; ContinueColumnScroll := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); Columns.Item[TObject(0)].Def[EXTREELib.DefColumnEnum.exCellCaptionFormat] := TObject(1); Columns.Item[TObject(0)].FormatColumn := 'value + ` <img>p` + (1 + (value mod 3 ) ) + `</img>`'; Columns.Item[TObject(0)].Width := 112; Columns.Item[TObject(1)].Def[EXTREELib.DefColumnEnum.exCellHasCheckBox] := TObject(1); Columns.Item[TObject(2)].LevelKey := '1'; Columns.Item[TObject(3)].LevelKey := '1'; Columns.Item[TObject(4)].LevelKey := '1'; AutoDrag := EXTREELib.AutoDragEnum.exAutoDragCopyImage; SingleSel := False; with Items do begin h := ItemByIndex[1]; SelectItem[h] := True; h := ItemByIndex[2]; SelectItem[h] := True; h := ItemByIndex[3]; SelectItem[h] := True; LockedItemCount[EXTREELib.VAlignmentEnum.BottomAlignment] := 1; h := LockedItem[EXTREELib.VAlignmentEnum.BottomAlignment,0]; CellCaption[TObject(h),TObject(1)] := '<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, ...'; CellSingleLine[TObject(h),TObject(1)] := EXTREELib.CellSingleLineEnum.exCaptionWordWrap; CellCaptionFormat[TObject(h),TObject(1)] := EXTREELib.CaptionFormatEnum.exHTML; CellHAlignment[TObject(h),TObject(1)] := EXTREELib.AlignmentEnum.CenterAlignment; ItemDivider[h] := 1; ItemDividerLineAlignment[h] := EXTREELib.DividerAlignmentEnum.DividerTop; end; EndUpdate(); end |
511 |
How can copy and paste the selection to Microsoft Word, Excel or any OLE compliant application, as a text
with AxTree1 do begin BeginUpdate(); ColumnAutoResize := False; ContinueColumnScroll := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); Columns.Item[TObject(2)].LevelKey := '1'; Columns.Item[TObject(3)].LevelKey := '1'; Columns.Item[TObject(4)].LevelKey := '1'; AutoDrag := EXTREELib.AutoDragEnum.exAutoDragCopyText; SingleSel := False; with Items do begin h := ItemByIndex[1]; SelectItem[h] := True; h := ItemByIndex[3]; SelectItem[h] := True; h := ItemByIndex[4]; SelectItem[h] := True; h := ItemByIndex[5]; SelectItem[h] := True; LockedItemCount[EXTREELib.VAlignmentEnum.BottomAlignment] := 1; h := LockedItem[EXTREELib.VAlignmentEnum.BottomAlignment,0]; CellCaption[TObject(h),TObject(0)] := '<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, Excel, ...'; CellSingleLine[TObject(h),TObject(0)] := EXTREELib.CellSingleLineEnum.exCaptionWordWrap; CellCaptionFormat[TObject(h),TObject(0)] := EXTREELib.CaptionFormatEnum.exHTML; CellHAlignment[TObject(h),TObject(0)] := EXTREELib.AlignmentEnum.CenterAlignment; ItemDivider[h] := 0; ItemDividerLineAlignment[h] := EXTREELib.DividerAlignmentEnum.DividerTop; end; EndUpdate(); end |
510 |
Is it possible to change the indentation during the drag and drop
with AxTree1 do begin BeginUpdate(); VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn'); AutoDrag := EXTREELib.AutoDragEnum.exAutoDragPositionAny; LinesAtRoot := EXTREELib.LinesAtRootEnum.exNoLinesAtRoot; HasLines := EXTREELib.HierarchyLineEnum.exSolidLine; HasButtons := EXTREELib.ExpandButtonEnum.exWPlus; ShowFocusRect := False; SelBackMode := EXTREELib.BackModeEnum.exTransparent; Columns.Add('Task'); with Items do begin h := AddItem('Group 1'); ItemBold[h] := True; ItemDivider[h] := 0; h1 := InsertItem(h,Nil,'Task 1'); h2 := InsertItem(h1,Nil,'Task 2'); h2 := InsertItem(h1,Nil,'Task 3'); h3 := InsertItem(h,Nil,'Task 3'); ExpandItem[h] := True; ExpandItem[h1] := True; h := AddItem('Group 2'); ItemBold[h] := True; ItemDivider[h] := 0; LockedItemCount[EXTREELib.VAlignmentEnum.BottomAlignment] := 1; h := LockedItem[EXTREELib.VAlignmentEnum.BottomAlignment,0]; CellCaption[TObject(h),TObject(0)] := 'Click a row, and move by dragging <b>up, down</b> to change the row''s parent or <b>left,right</b> to increase or decrease the in' + 'dentation.'; CellSingleLine[TObject(h),TObject(0)] := EXTREELib.CellSingleLineEnum.exCaptionWordWrap; CellCaptionFormat[TObject(h),TObject(0)] := EXTREELib.CaptionFormatEnum.exHTML; end; EndUpdate(); end |
509 |
Is it possible to allow moving an item to another, but keeping its indentation
with AxTree1 do begin BeginUpdate(); VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn'); AutoDrag := EXTREELib.AutoDragEnum.exAutoDragPositionKeepIndent; LinesAtRoot := EXTREELib.LinesAtRootEnum.exNoLinesAtRoot; HasLines := EXTREELib.HierarchyLineEnum.exThinLine; ShowFocusRect := False; Columns.Add('Task'); with Items do begin h := AddItem('Group 1'); ItemDivider[h] := 0; ItemBold[h] := True; h1 := InsertItem(h,Nil,'Task 1'); h2 := InsertItem(h,Nil,'Task 2'); h3 := InsertItem(h,Nil,'Task 3'); ExpandItem[h] := True; h := AddItem('Group 2'); ItemBold[h] := True; ItemDivider[h] := 0; end; EndUpdate(); end |
508 |
How can I change the row's position to another, by drag and drop. Is it possible
with AxTree1 do begin BeginUpdate(); ShowFocusRect := False; VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn'); AutoDrag := EXTREELib.AutoDragEnum.exAutoDragPosition; Columns.Add('Task'); with Items do begin AddItem('Task 1'); AddItem('Task 2'); AddItem('Task 3'); AddItem('Task 4'); end; EndUpdate(); end |
507 |
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area
with AxTree1 do begin BeginUpdate(); ScrollBars := EXTREELib.ScrollBarsEnum.exDisableBoth; set_ScrollPartVisible(EXTREELib.ScrollBarEnum.exVScroll,EXTREELib.ScrollPartEnum.exExtentThumbPart,True); set_ScrollPartVisible(EXTREELib.ScrollBarEnum.exHScroll,EXTREELib.ScrollPartEnum.exExtentThumbPart,True); set_ScrollPartVisible(EXTREELib.ScrollBarEnum($2),EXTREELib.ScrollPartEnum.exExtentThumbPart,True); ScrollWidth := 4; set_Background(EXTREELib.BackgroundPartEnum.exVSBack,$f0f0f0); set_Background(EXTREELib.BackgroundPartEnum.exVSThumb,$808080); ScrollHeight := 4; set_Background(EXTREELib.BackgroundPartEnum.exHSBack,get_Background(EXTREELib.BackgroundPartEnum.exVSBack)); set_Background(EXTREELib.BackgroundPartEnum.exHSThumb,get_Background(EXTREELib.BackgroundPartEnum.exVSThumb)); set_Background(EXTREELib.BackgroundPartEnum.exScrollSizeGrip,get_Background(EXTREELib.BackgroundPartEnum.exVSBack)); EndUpdate(); end |
506 |
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)
with AxTree1 do begin BeginUpdate(); MarkSearchColumn := False; with Columns do begin with (Add('Car') as EXTREELib.Column) do begin DisplayFilterButton := True; FilterType := EXTREELib.FilterTypeEnum.exFilter; Filter := 'MAZDA'; end; with (Add('Equipment') as EXTREELib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*'; FilterType := EXTREELib.FilterTypeEnum.exPattern; Filter := 'AIR BAG'; end; end; with Items do begin CellCaption[TObject(AddItem('Mazda')),TObject(1)] := 'Air Bag'; CellCaption[TObject(AddItem('Toyota')),TObject(1)] := 'Air Bag,Air condition'; CellCaption[TObject(AddItem('Ford')),TObject(1)] := 'Air condition'; CellCaption[TObject(AddItem('Nissan')),TObject(1)] := 'Air Bag,ABS,ESP'; CellCaption[TObject(AddItem('Mazda')),TObject(1)] := 'Air Bag, ABS,ESP'; CellCaption[TObject(AddItem('Mazda')),TObject(1)] := 'ABS,ESP'; end; ApplyFilter(); EndUpdate(); end |
505 |
How can I have a case-sensitive filter
with AxTree1 do begin BeginUpdate(); MarkSearchColumn := False; with Columns do begin with (Add('Car') as EXTREELib.Column) do begin DisplayFilterButton := True; FilterType := Integer(EXTREELib.FilterTypeEnum.exFilterDoCaseSensitive) Or Integer(EXTREELib.FilterTypeEnum.exFilter); Filter := 'Mazda'; end; with (Add('Equipment') as EXTREELib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; CustomFilter := 'Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*'; FilterType := Integer(EXTREELib.FilterTypeEnum.exFilterDoCaseSensitive) Or Integer(EXTREELib.FilterTypeEnum.exPattern); Filter := 'Air Bag'; end; end; with Items do begin CellCaption[TObject(AddItem('Mazda')),TObject(1)] := 'Air Bag'; CellCaption[TObject(AddItem('Toyota')),TObject(1)] := 'Air Bag,Air condition'; CellCaption[TObject(AddItem('Ford')),TObject(1)] := 'Air condition'; CellCaption[TObject(AddItem('Nissan')),TObject(1)] := 'Air Bag,ABS,ESP'; CellCaption[TObject(AddItem('Mazda')),TObject(1)] := 'Air Bag, ABS,ESP'; CellCaption[TObject(AddItem('Mazda')),TObject(1)] := 'ABS,ESP'; end; ApplyFilter(); EndUpdate(); end |
504 |
I have several columns, but noticed that the filter is using AND between columns, but I need OR clause for filtering. Is it possible
with AxTree1 do begin BeginUpdate(); LinesAtRoot := EXTREELib.LinesAtRootEnum.exLinesAtRoot; with (Columns.Add('Item') as EXTREELib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; Filter := 'Child 1'; FilterType := EXTREELib.FilterTypeEnum.exFilter; end; with (Columns.Add('Date') as EXTREELib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; DisplayFilterDate := True; FilterList := Integer(EXTREELib.FilterListEnum.exShowExclude) Or Integer(EXTREELib.FilterListEnum.exShowFocusItem) Or Integer(EXTREELib.FilterListEnum.exShowCheckBox) Or Integer(EXTREELib.FilterListEnum.exNoItems); Filter := '12/28/2010'; FilterType := EXTREELib.FilterTypeEnum.exDate; end; FilterCriteria := '%0 or %1'; set_Description(EXTREELib.DescriptionTypeEnum.exFilterBarOr,'<font ;18><fgcolor=FF0000>or</fgcolor></font>'); set_Description(EXTREELib.DescriptionTypeEnum.exFilterBarAnd,'<font ;18><fgcolor=FF0000>and</fgcolor></font>'); with Items do begin h := AddItem('Root 1'); CellCaption[TObject(InsertItem(h,Nil,'Child 1')),TObject(1)] := '12/27/2010'; CellCaption[TObject(InsertItem(h,Nil,'Child 2')),TObject(1)] := '12/28/2010'; ExpandItem[h] := True; h := AddItem('Root 2'); CellCaption[TObject(InsertItem(h,Nil,'Child 1')),TObject(1)] := '12/29/2010'; CellCaption[TObject(InsertItem(h,Nil,'Child 2')),TObject(1)] := '12/30/2010'; end; ApplyFilter(); EndUpdate(); end |
503 |
Is it possible exclude the dates being selected in the drop down filter window
with AxTree1 do begin BeginUpdate(); with (Columns.Add('Date') as EXTREELib.Column) do begin SortType := EXTREELib.SortTypeEnum.SortDate; DisplayFilterButton := True; DisplayFilterPattern := False; DisplayFilterDate := True; FilterList := Integer(EXTREELib.FilterListEnum.exShowExclude) Or Integer(EXTREELib.FilterListEnum.exShowFocusItem) Or Integer(EXTREELib.FilterListEnum.exShowCheckBox) Or Integer(EXTREELib.FilterListEnum.exNoItems); end; with Items do begin AddItem('12/27/2010'); AddItem('12/28/2010'); AddItem('12/29/2010'); AddItem('12/30/2010'); AddItem('12/31/2010'); end; EndUpdate(); end |
502 |
How can I display a calendar control inside the drop down filter window
with AxTree1 do begin BeginUpdate(); with (Columns.Add('Date') as EXTREELib.Column) do begin SortType := EXTREELib.SortTypeEnum.SortDate; DisplayFilterButton := True; DisplayFilterPattern := False; DisplayFilterDate := True; FilterList := Integer(EXTREELib.FilterListEnum.exShowFocusItem) Or Integer(EXTREELib.FilterListEnum.exShowCheckBox) Or Integer(EXTREELib.FilterListEnum.exNoItems); end; with Items do begin AddItem('12/27/2010'); AddItem('12/28/2010'); AddItem('12/29/2010'); AddItem('12/30/2010'); AddItem('12/31/2010'); end; EndUpdate(); end |
501 |
Is it possible to include the dates as checkb-boxes in the drop down filter window
with AxTree1 do begin BeginUpdate(); with (Columns.Add('Dates') as EXTREELib.Column) do begin SortType := EXTREELib.SortTypeEnum.SortDate; DisplayFilterButton := True; DisplayFilterPattern := True; DisplayFilterDate := True; FilterList := Integer(EXTREELib.FilterListEnum.exShowFocusItem) Or Integer(EXTREELib.FilterListEnum.exShowCheckBox); Filter := 'to 12/27/2010'; FilterType := EXTREELib.FilterTypeEnum.exDate; end; with Items do begin AddItem('12/27/2010'); AddItem('12/28/2010'); AddItem('12/29/2010'); AddItem('12/30/2010'); AddItem('12/31/2010'); end; ApplyFilter(); EndUpdate(); end |